// ** Copyright (c) 2011* Freiburg, Germany * All rights reserved.
// ** File name：EatSpaces.cpp
// ** Current version：1.0 * Author：Yongkang Zhong * Finish time：22.05.2011
// ** Replace version：1.0 * Original author: Yongkang Zhong * Finish time：22.05.2011

// The function eatspaces, which gets rid of any spaces in input string.
void eatspaces(char *str)
{
    int i = 0, j = 0;
    
    while(true)
    {
        if (str[i] == '\0')
        {
            str[j] = '\0';
            break;
        }
        
        if (str[i] != ' ')
            str[j++] = str[i++];
        else
            i++;
    }
}
